ubotfandomcom-20200214-history
Commands
Action Commands nav http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg The nav command simply visits whatever URL you choose. The only parameters are the url and Yes and No, which correspond to whether or not the script should wait until the site finishes loading before moving onto the next command. This is set to default and will be chosen most of the time. send email http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg The send email command allows UBot scripts to connect to smtp email accounts and create and send emails. click dialog button http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg The click dialog button command allows for the pressing of any (usually javascript) dialog button that appears on the screen. clear cookies http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg This command is useful if you want to visit a site as more than one user but the site regularly records your visits in a cookie file. change proxy http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg This command lets you flip proxies. You can do this using a list from a file, or with a variable, or with specified proxies. create account http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg The create account function builds all of the information necessary to create most accounts on most web pages. build account http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg Build account works the same way as create account but allows you to specify the username, email address, and password. Flow Commands loop http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg The loop command allows anything contained within it to repeat a given number of times. That number can be a numeral (from 1 all the way up to infinity) or it can be the contents of a variable. Note that you can insert more lines above the command place holder. while http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg The while command functions similarly to loop. This command will run all contained commands for as long as its qualifier remains true. Note that you can insert lines above the command placeholder. sub / run sub The sub command is one of the most useful features in UBot. A sub is like a self contained script within a script. It helps to create cleaner and more maintainable code. When you have a sub in your script, it will not run until you call it using the run sub command. Besides cleaner scripting and easier organization, it allows you to create an independent script that can be called by any other portion of the bot. delay http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg The delay command waits a specified number of seconds before continuing with the next command. – it suspends the script for the specified number of seconds. This is probably the most simple command in all of UBot. wait finish http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg Wait finish suspends the script until the webpage finishes loading. While this is generally not necessary, some specific commands that requiIe a dialog button is pushed, for example, may require wait finish or the script would otherwise not pause for the results of the button to occur. if / then http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg The “if then” command sequence is a fairly common way to determine the flow of events in scripting. In UBot it works very simply. A qualifier (see above) follows the “if” command, and the action specified follows the “then” command. Chosen Commands wait for http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg This command will suspend the script until the specified text appears on the web page. Works well with ajax. Chosen commands can be found when you right click a script node or when you right click in your browser window. choose by attribute http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg Choose by attribute is probably one of the most common commands that you will use in UBot, because it is part of the foundation of how UBot communicates with webpages. Before you can manipulate a part of a webpage, you must first choose it. You can choose an element of a page by any of its attributes. Selecting a value in the parameters window will display its current value under the search parameter. choose by position http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg Another option for choosing elements, choose by position will choose the element based on what the tag name is, and the order of said tags in the document. For instance, if the parameters are INPUT and 4, it will choose the 4th input tag on the page. Parameters are chosen automatically. change chosen attribute http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg Your goal in many scripts will be to modify websites – whether by filling text boxes, clicking buttons, or choosing from drop-down lists. The change chosen attribute command allows you to modify any modifiable attribute of an element, regardless of which attribute you select. After choosing an element by attribute, you will often be using the change chosen attribute command to modify the page itself. select random child chosen http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg Select random child chosen is extremely useful for drop-down boxes. Choosing this command after choosing a drop-down list by attribute randomly chooses any value within the drop-down box. click chosen http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg This command will click a link or a button. You can also toggle check boxes with it. decode chosen captcha http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg After choosing a captcha image by attribute, using the “decode chosen captcha” command will bring the captcha image into a separate dialog box and the script will wait for a user to enter a value (the captcha) and press OK. decaptcher chosen captcha http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg This command will use the decaptcher service to automatically decode captchas for you. To sign up with decaptcher, visit decaptcher.com send keys chosen http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg This command is used specifically for filling text into file input fields, as a means of getting around the lack of direct access to them. This command will not steal focus, and runs entirely in the background. To simulate typing on elements other than file fields, use send keys chosen field. send keys field chosen http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg This command will simulate keystrokes to input fields other than file fields. This is useful in cases where the field reacts tokeystrokes with javascript, and change chosen attribute does not trigger the javascript associated with the element. Variable Commands set http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg Set allows you to create a variable and choose its value (it can be left blank until later if required). All variables begin with the pound sign (#) to distinguish them from other strings. inc http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg Increments a number variable by 1. dec http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg Decrements a number variable by 1. save to file http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg Saves text and lists to files. With text, it will save the text verbatim to the specified file. With lists, it will save one list item per line. To read files, use constants $read file and $list from file. add to list http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg Add to list allows you to work with multiple strings or variables at one time, which is essential for page scraping or loading information from text files. set list position http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg This sets the position of a list, which is used by $next list item. clear list http://images3.wikia.nocookie.net/ubot/images/3/31/Lm.jpg Clear list empties the contents of a list.